import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path:'/',
            redirect:'/isExistUser'
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/hospital/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '/manage',
            component: () => import(/* webpackChunkName: "manage" */ '../components/page/hospital/ManageMain.vue'),
            meta: { title: '主页' }
        },
        {
            path: '/assess',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/hospital/Assess.vue'),
            meta: { title: '康复评估' }
        },
        {
            path: '/train',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/hospital/Train.vue'),
            meta: { title: '康复训练' }
        },
        {
            path: '/trainRecord',
            component: () => import(/* webpackChunkName: "train" */ '../components/page/hospital/TrainRecord'),
            meta: { title: '康复记录' }
        },
        {
            path: '/menu',
            component: () => import(/* webpackChunkName: "train" */ '../components/page/hospital/Menu'),
            meta: { title: '康复训练菜单配置' }
        },
        {
            path: '/isExistUser',
            component: () => import(/* webpackChunkName: "isexist" */ '../components/page/hospital/addUser.vue'),
            meta: { title: '注册用户' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ],
});
